package com.gps.funnymath.main;

import java.util.ArrayList;

import com.gps.funnymath.concreteItems.ConcreteToken;


public class ConcreteProblem {

	private ArrayList<ConcreteToken> concreteData;
	private ArrayList<ConcreteToken> concreteQuestion;
	private ArrayList<ConcreteToken> concreteSolution;
	private ArrayList<ConcreteToken> concreteEasyTip;
	
	public ConcreteProblem(){
		concreteData = new ArrayList<ConcreteToken>();
		concreteQuestion = new ArrayList<ConcreteToken>();
		concreteSolution = new ArrayList<ConcreteToken>();
		concreteEasyTip = new ArrayList<ConcreteToken>();
	}

	@Override
	public String toString() {
		
		String problemText = new String();
		
		problemText += "Data:\n";
		for(ConcreteToken concreteToken : concreteData){
			problemText += concreteToken.toString() + " ";
		}
		problemText += "\n";
		
		problemText += "Question:\n";
		for(ConcreteToken concreteToken : concreteQuestion){
			problemText += concreteToken.toString() + " ";
		}
		problemText += "?\n";
		
		problemText += "Solution:\n";
		for(ConcreteToken concreteToken : concreteSolution){
			problemText += concreteToken.toString() + " ";
		}
		problemText += "\n";
		
		problemText += "Easy Tip:\n";
		for(ConcreteToken concreteToken : concreteEasyTip){
			problemText += concreteToken.toString() + " ";
		}
		problemText += "\n";

		return problemText;
	}
	
	protected boolean addTokenToData(ConcreteToken concreteToken){
		return concreteData.add(concreteToken);
	}
	protected boolean addTokenToQuestion(ConcreteToken concreteToken){
		return concreteQuestion.add(concreteToken);
	}
	protected boolean addTokenToSolution(ConcreteToken concreteToken){
		return concreteSolution.add(concreteToken);
	}
	protected boolean addTokenToEasyTip(ConcreteToken concreteToken){
		return concreteEasyTip.add(concreteToken);
	}

	
}
